pipeline {
  agent any
  environment {
    DEPLOY_ENV = 'dev'
  }
  stages {
    stage('Build') {
      steps {
        echo 'build...'
      }
    }
    stage('Deploy') {
      when {
        environment name: 'DEPLOY_ENV', value: 'dev' 
      }
      steps {
        echo 'deploying...'
      }
    }
  }
}
